<#include "header.ftl">
<div class="easyui-layout yvan-dialog-box" fit="true">
    <div id="theCustInfoDiv">
        <div class="yvan-form" style="100%" data-options="region:'center'">
            <form id="theCustInfoForm" name="theCustInfoForm" enctype="multipart/form-data">
                <div class="yvan-form-groups noborder">
                    <div class="col-lg-5">
                        <div class="form-group">
                            <a id="downloadExcel" onclick="downloadCustInfoForm()" class="easyui-linkbutton button-line-black l-btn l-btn-small">
                                <i class="yvan-icon fa fa-cloud-download"></i> 【Excel模板】下载
                            </a>
                        </div>
                    </div>
                    <fieldset class="yvan-form-groups">
                        <legend>帮助</legend>
                        <div style="height:auto ">
                            <label style="margin-left: 20px">请下载Excel模版，按照格式填写，保存后上传到系统。</br></label>
                            <label style="margin-left: 20px">每行信息必须完整，否则该行信息上传失败。</br></label>
                            <label style="margin-left: 20px">1.用户姓名：不能和已有用户重复。不超过12个字符。</br></label>
                            <label style="margin-left: 20px">2.登录账户：不能和已有用户重复。不超过12个字符。</br></label>
                            <label style="margin-left: 20px">3.密码：6至12个字符。</br></label>
                            <label style="margin-left: 20px">4.所属部门：采购部，总代理，分销部，器械部，中药部，医院部。</br></label>
                            <label style="margin-left: 20px">5.公司标识：填写分公司标识，如：FDG。</br></label>
                            <label style="margin-left: 20px">6.状态：1：启用，2：禁用。</br></label>
                        </div>
                    </fieldset>
                </div>
            </form>
        </div>
        <div class="yvan-form-toolbar" data-options="region:'north'" align="right">
            <a href="javascript:;" onclick="closeCustInfo()" class="easyui-linkbutton button-line-black l-btn l-btn-small" data-options="">
                <i class="yvan-icon fa fa-close"></i> 取消
            </a>
            <a href="javascript:;" onclick="saveCustInfo()"  class="easyui-linkbutton button-blue" data-options="">
                <i class="fa fa-save fa-lg"></i> 保存
            </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        </div>
    </div>
    <form id="excelForm" name="excelForm" enctype="multipart/form-data" action="/sell/excel/import.json" method="post" >
        <input type="file" id="importFile" name="importFile">
        <input type="submit" value="提交">
    </form>
</div>
<script>
function importFile() {
   $("#excelForm").form("submit",{
       url:'/sell/excel/import.json',
       async:false,
       type:"post",
       dataType:"json",
       success:function (data) {
           alert("1");
           alert(data);
       }
   });
}
//下载模板
function downloadCustInfoForm() {
  window.location.href="/sell/excel/download";
}
</script>